/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrgs.jsopa;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author fkrahe
 */
public class Utils {

    public static boolean compareFilesByHash(String filename1, String filename2) {
        try {
            String checksum1 = MD5Checksum.getMD5Checksum(filename1);
            String checksum2 = MD5Checksum.getMD5Checksum(filename2);
            return checksum1.equals(checksum2);
        } catch (Exception ex) {
            Logger.getLogger(Utils.class.getName()).log(Level.SEVERE, null, ex);
            return false;
        }
    }
}
